<script>
import {defineComponent} from 'vue'

export default defineComponent({
  name: "Menu"
})
</script>

<template>
<div class="menu">
  <ul>
    <!-- 使用 router-link 组件来导航. -->
    <!-- 通过传入 `to` 属性指定链接. -->
    <!-- <router-link> 默认会被渲染成一个 `<a>` 标签 -->
    <li><router-link to="/home">Home</router-link></li>
    <li><router-link to="/about">About</router-link></li>
  </ul>
</div>
</template>

<style scoped lang="less">
.menu{
  width: 250px;
  height: 100%;
  background-color: #3e4441;
  ul{
    width: 100%;
    li{
      cursor: pointer;
      width: 100%;
      text-align: center;
      height: 60px;
      line-height: 60px;
      &:hover{
        background-color: cornflowerblue;
        color: #fff;
      }
      a{
        display: block;
        width: 100%;
        height: 100%;
        font-size: 20px;
        text-decoration: none;
        color: #fff;
      }
    }
  }
}
</style>
